package learningThread.api.stopApi.sleepStop;

public class MyThread1 extends Thread{

    /**
     * 並沒什麽用
     */
    @Override
    public void run() {

        try {
            for (int i = 0; i < 300000; i++) {
                System.out.println("i="+(i+1));
            }
            System.out.println("run begin");
            Thread.sleep(200000);
            System.out.println("run end");
        } catch (InterruptedException e) {
            System.out.println("先停止再sleep,進入catch，"+this.isInterrupted());
            e.printStackTrace();

        }
    }
}
